.@{gx-prefix}-color {
  background-color: #ffffff;
  
  &-color-picker {
    position: relative;
    width: 48px;
    padding: 5px;
    cursor: pointer;
    border: 1px solid rgb(221, 221, 221);
    border-radius: 2px;
  }
  
  &-color-picker-disabled {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, .7);
  }
  
  &-main-wrapper {
    display: flex;
    flex-direction: row-reverse;
    margin-bottom: 6px;
  }
  
  &-hus-slider {
    position: relative;
    box-sizing: border-box;
    float: right;
    width: 280px;
    height: 12px;
    padding: 0 2px;
    background-color: red;
    
    &.is-vertical {
      width: 12px;
      height: 180px;
      padding: 2px 0;
      
      .@{gx-prefix}-color-slider-bar {
        background: linear-gradient(180deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
      }
      
      .@{gx-prefix}-color-slider-thumb {
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
      }
    }
    
    .@{gx-prefix}-color-slider-bar {
      position: relative;
      height: 100%;
      background: linear-gradient(90deg, red 0, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, red);
    }
    
    .@{gx-prefix}-color-slider-thumb {
      position: absolute;
      top: 0;
      left: 0;
      z-index: 1;
      box-sizing: border-box;
      width: 4px;
      height: 100%;
      cursor: pointer;
      background: #fff;
      border: 1px solid #f0f0f0;
      border-radius: 1px;
      box-shadow: 0 0 2px rgb(0 0 0 / 60%);
    }
  }
  
  &-color-svpanel {
    position: relative;
    width: 280px;
    height: 180px;
    margin-right: 8px;
  }
  
  &-svpanel-white {
    background: linear-gradient(90deg, #fff, hsla(0, 0%, 100%, 0));
  }
  
  &-svpanel-black {
    background: linear-gradient(0deg, #000, transparent);
  }
  
  &-svpanel-black, &-svpanel-black {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
  }
  
  &-svpanel-cursor {
    position: absolute;
    
    & > div {
      width: 4px;
      height: 4px;
      cursor: pointer;
      border-radius: 50%;
      box-shadow: 0 0 0 1.5px #fff, inset 0 0 1px 1px rgb(0 0 0 / 30%), 0 0 1px 2px rgb(0 0 0 / 40%);
      transform: translate(-2px, -2px);
    }
  }
  
  &-alpha-slider {
    position: relative;
    box-sizing: border-box;
    width: 280px;
    height: 12px;
    background: url(/src/assets/public_image/transparent.png);
  }
  
  &-alpha-slider-bar {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg, hsla(0, 0%, 100%, 0) 0, #fff);
  }
  
  &-alpha-slider-thumb {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    box-sizing: border-box;
    width: 4px;
    height: 100%;
    cursor: pointer;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 1px;
    box-shadow: 0 0 2px rgb(0 0 0 / 60%);
  }
  
  &-predefine {
    display: flex;
    width: 280px;
    margin-top: 8px;
    font-size: 12px;
  }
  
  &-predefine-colors {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
  }
  
  &-predefine-color-selector {
    width: 20px;
    height: 20px;
    margin: 0 0 8px 8px;
    cursor: pointer;
    border-radius: 4px;
    
    & > div {
      display: flex;
      height: 100%;
      border-radius: 3px;
    }
    
    &.selected {
      box-shadow: 0 0 3px 2px @primary-color;
    }
    
    &.is-alpha {
      background: url(/src/assets/public_image/transparent.png);
    }
    
    &:nth-child(10n+1) {
      margin-left: 0;
    }
  }
}
